home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_gen_sectorliteanim.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  81 lines

  1. # Jones 3D Cog Script
  2. #
  3. # Generic Script to set a sector to pulse light
  4. # Min/Max at pulse messages. Pulse runs continuously
  5. # Steve C.
  6. #
  7. # [YB]
  8. #
  9. # (C) 1997 LucasArts Entertainment Co. All Rights Reserved
  10. # ========================================================================================
  11.  
  12. symbols
  13.     message  startup
  14.     message  pulse
  15.  
  16.     sector   pulsesector0
  17.     sector   pulsesector1
  18.     sector   pulsesector2
  19.     sector   pulsesector3
  20.     sector   pulsesector4
  21.     sector   pulsesector5
  22.     sector   pulsesector6
  23.     sector   pulsesector7
  24.  
  25.     float    pulseval=1.5       //time to Min or Max liteval
  26.  
  27.     float        maxLightR=1.0    
  28.     float        maxLightG=1.0    
  29.     float        maxLightB=1.0    
  30.  
  31.     float        minLightR=0.0    
  32.     float        minLightG=0.0    
  33.     float        minLightB=0.0    
  34.  
  35.     vector    vecMinLight        local
  36.     vector    vecMaxLight        local
  37.  
  38.     int      flag=0      local
  39.     int      index=0     local
  40.     int      numsects=0  local
  41.     int        i=0            local
  42. end
  43.  
  44. code
  45.  
  46. # ........................................................................................
  47.  
  48. startup:
  49.     for (i=0; i<=7; i=i+1)
  50.     {
  51.         if (pulsesector0[i] >=0) numsects=numsects + 1;
  52.     }
  53.    SetPulse(pulseval);
  54.    return;
  55.  
  56. # ........................................................................................
  57.  
  58. pulse:
  59.     if (flag == 1)
  60.     {
  61.         for (index=0; index < numsects; index = index + 1)
  62.         {
  63.             SetSectorLight(pulsesector0[index], vecMinLight, pulseval);
  64.         }
  65.         flag=0;
  66.         return;
  67.     }
  68.     else if (flag == 0)
  69.     {
  70.         for (index=0; index < numsects; index = index + 1)
  71.         {
  72.             SetSectorLight(pulsesector0[index], vecMaxLight, pulseval);
  73.         }
  74.         flag=1;
  75.         return;
  76.     }
  77.     return;
  78. end
  79.  
  80.  
  81.